function localiza (lat, long, nombre, tipo, userID, map)
{
	var point = new GLatLng(lat, long, true);
	var myIcon;
	
	//tipo es un entero para elegir el icono, 0 - evento, 1...n - usuario
	var baseIcon = new GIcon();
	if (tipo == 0){
		baseIcon.image = "http://maps.google.com/mapfiles/ms/micons/hiker.png";
		baseIcon.shadow = "http://maps.google.com/mapfiles/ms/micons/hiker.shadow.png";
		baseIcon.iconSize = new GSize(16, 16);
		baseIcon.shadowSize = new GSize(30, 16);
	}
	else if(tipo == 1){
		var baseIcon = new GIcon();
		baseIcon.image = "http://maps.google.com/mapfiles/ms/micons/hiker.png";
		baseIcon.shadow = "http://maps.google.com/mapfiles/ms/micons/hiker.shadow.png";
		baseIcon.iconSize = new GSize(32, 32);
		baseIcon.shadowSize = new GSize(59, 32);
	}
	if (tipo == 3){
		var baseIcon = new GIcon();
		baseIcon.image = "http://maps.google.com/mapfiles/ms/micons/man.png";
		baseIcon.shadow = "http://maps.google.com/mapfiles/ms/micons/man.shadow.png";
		baseIcon.iconSize = new GSize(16, 16);
		baseIcon.shadowSize = new GSize(30, 16);
	}
	else if(tipo == 4){
		var baseIcon = new GIcon();
		baseIcon.image = "http://maps.google.com/mapfiles/ms/micons/man.png";
		baseIcon.shadow = "http://maps.google.com/mapfiles/ms/micons/man.shadow.png";
		baseIcon.iconSize = new GSize(32, 32);
		baseIcon.shadowSize = new GSize(59, 32);
	}
	if (tipo == 5){
		var baseIcon = new GIcon();
		baseIcon.image = "http://maps.google.com/mapfiles/ms/micons/woman.png";
		baseIcon.shadow = "http://maps.google.com/mapfiles/ms/micons/woman.shadow.png";
		baseIcon.iconSize = new GSize(16, 16);
		baseIcon.shadowSize = new GSize(30, 16);
	}
	else if(tipo == 6){
		var baseIcon = new GIcon();
		baseIcon.image = "http://maps.google.com/mapfiles/ms/micons/woman.png";
		baseIcon.shadow = "http://maps.google.com/mapfiles/ms/micons/woman.shadow.png";
		baseIcon.iconSize = new GSize(32, 32);
		baseIcon.shadowSize = new GSize(59, 32);
	}
	else if(tipo == 7){
		var baseIcon = new GIcon();
		baseIcon.image = "http://maps.google.com/mapfiles/ms/micons/flag.png";
		baseIcon.shadow = "http://maps.google.com/mapfiles/ms/micons/flag.shadow.png";
		baseIcon.iconSize = new GSize(32, 32);
		baseIcon.shadowSize = new GSize(59, 32);
	}
	
	baseIcon.iconAnchor = new GPoint(17, 17);
	baseIcon.infoWindowAnchor = new GPoint(9, 2);
	baseIcon.infoShadowAnchor = new GPoint(18, 25);
	myIcon = new GIcon (baseIcon);

	markerOptions = { icon: myIcon};
	var marker = new GMarker(point, markerOptions);
	
	var url=tipo==0?"evento":"usuario";
	url+=".jsp?nombre="+nombre;
	
	if(tipo<=1){
  		GEvent.addListener(marker, "click", function() {
    	marker.openInfoWindowHtml("<a href=\"FrontController?action=redirect&url=evento.jsp?nombre="+userID+"\">"+nombre+"</a>"); });
    }
    else if(tipo>=2 || tipo<=7){
    	GEvent.addListener(marker, "click", function() {
    	marker.openInfoWindowHtml("<a href=\"FrontController?action=redirect&url=usuario.jsp?nombre="+userID+"\">"+nombre+"</a>"); });
    }
	
	map.addOverlay(marker);
}

  
  